import QtQuick 2.12
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.3
//import StandardItemModel 0.1
import TableModel 0.1

Page{
    id:root
    title: "Button"
    property var  colors: ["1","2","3","4","5","6"]

    TableView{
        id:table
        anchors.fill: parent
        columnSpacing: 1
        rowSpacing: 1
        clip: true

        model:result



        delegate: Rectangle {
          implicitWidth: 100
          implicitHeight: 50
          Text {
              text: display
          }
        }
    }


    ResultModel{
        id:result
//        Component.onCompleted: {
//            setHeader(colors);
//            replaceModel(StandardItemModel.getModel())
//        }
    }

    Button{
        text: "kfsd"
        onClicked: {
            result.test()
        }
    }
    Component.onCompleted: {
//        StandardItemModel.importData()
//        console.log(StandardItemModel.rowCount())
//        table.model = StandardItemModel

    }



}
